<div class="r0 p10 pt0 col-xs-12" ng-controller="detailCtrl">
<div class="col-xs-12 p0 mt10">
	<form  target="hiddenFrame" name="articleForm" action="file/upload.do?callBack=acticleUploadImgCallBack"
			enctype="multipart/form-data" 
			method="post">
		<table class="table table-bordered">
			<tr>
				<td class="tc w50">标题</td>
				<td class="tc">
						<input  class="form-control" type="text" ng-model="model.name" required>
				</td>
			</tr>

			<tr ng-if="model.status == 100">
				<td class="tc w50">Key</td>
				<td class="tc">
					<input  class="form-control" type="text" ng-model="model.mkey" placeholder="页面唯一标识，不可重复，英文，如：HELP">
				</td>
			</tr>

			<tr>
				<td class="tc">类目</td>
				<td>
					* 没有找到合适的类目？进入文章所在模块，点击编辑模块即可新增类目-》[
					<a ng-href="#/user/module/list/{{model.projectId}}/{{model.moduleName}}" target="_blank">修改模块【{{model.moduleName}}】的文章类目</a>
					]
					<input class="form-control" type="text" id="category" ng-model="model.category"  placeholder="点击选择类目"
								   ng-click="loadPick($event,220,250,'true','category','CATEGORY', '', model.category, '&key='+model.moduleId,0);">
				</td>
			</tr>
			
			<tr>
				<td class="tc">简介</td>
				<td class="tc">
					<textarea  class="form-control no-resize" rows="5" ng-model="model.brief"></textarea></td>
			</tr>
			<tr>
				<td class="tc">类型</td>
				<td class="tc">
					<input  class="form-control" type="text" ng-model="model.typeName" readonly>
				</td>
			</tr>

			<tr ng-if="showOperation('ARTICLE','');">
				<td class="tc">状态</td>
				<td>
					* 推荐：将出现在首页推荐文章菜单下，站点页面：需要添加key，后端菜单将支持选着跳转至该站点页面（如果首页、联系页面等）
					<input class="form-control" type="text" id="statusName"  placeholder="点击选择状态" ng-model="model.statusName"
						   ng-click="loadPickByName('iwidth=220|iheight=250|tagName=statusName|tag=status|code=ARTICLE_STATUS|def='+model.status,$event)">
				</td>
			</tr>

			<tr>
				<td class="tc">模块</td>
				<td class="tl">
					* 点击选择模块
					<input class="form-control cursor" type="text"  id="moduleName" required ng-model="model.moduleName"
							ng-click="loadPickByName('iwidth=220|iheight=250|tagName=moduleName|tag=moduleId|code=PROJECT_MODULES|def='+model.moduleId+'|params=&key='+model.projectId,$event)">
				</td>
			</tr>
			<tr>
				<td class="tc">是否可评论</td>
				<td class="tc">
						<select name="type" class="form-control" ng-model="model.canComment">
								<option value="1" ng-selected="item.canComment==1">可评论</option>
								<option value="0" ng-selected="item.canComment==0">不可评论</option>
						</select>
				</td>
				
			</tr>
			<tr>
				<td class="tc">排序</td>
				<td class="tc">
					<input class="form-control" min="0" max="10000" required type="number" ng-model="model.sequence">
				</td>
			</tr>
			<tr>
				<td class="tc">
					内容
					<input type="button" class="btn btn-default btn-sm mt10" value="默认编辑器" onclick="changeDisplay('defEditor','kindEditor')">
					<input type="button" class="btn btn-default btn-sm mt10" value="Kind编辑器" ng-click="createEditor('eidtorId','content')">
					<input type="button" class="btn btn-default btn-sm mt10" value="MarkDown" ng-click="markdownEtitor('user/article/markdown.do?id='+model.id)">
				</td>
				<td class="tc">
					<!-- 默认编辑器 -->
					<div id="defEditor">
						<div class="C999 file mr20 cursor tl pl10"  title="点击选择图片" onclick="$('#uploadImg').click();">
							添加图片：<i class="iconfont f20 main-color">&#xe619;</i>
						</div>
						<span class="ndis">
								<input type="file" name="img" onchange="uploadImage('uploadImg',2048,articleForm)" id="uploadImg"/>
						</span>
						<div  ng-model="model.content" text-angular="text-angular"  class="tl p10 imgCenter"></div>
					</div>
					<div id="kindEditor" class="none p10">
						<textarea id="eidtorId" ng-model="model.content" style="width:100%;height:500px;"></textarea>
					</div>
				</td>
			</tr>
			
	</table>
	<button type="button" ng-click="submitForm('user/article/addOrUpdate.do')" class="btn btn-success fr">提交</button>
	</form>
	
</div>
</div>
<div class="cb"></div>
<iframe name="hiddenFrame" class="ndis"></iframe>
